package at.fhv.components.save;

import java.beans.EventSetDescriptor;
import java.beans.MethodDescriptor;
import java.beans.ParameterDescriptor;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;
import java.lang.reflect.Method;

import at.fhv.framework.events.ImageEvent;

/**
 * The ImagePanelBeanInfo class.
 * 
 * @author Michael Sieber
 */
public class SaveFilterBeanInfo extends SimpleBeanInfo {
	@Override
	public EventSetDescriptor[] getEventSetDescriptors() {
		EventSetDescriptor[] arrayOfEventSetDescriptor =
				new EventSetDescriptor[0];
		return arrayOfEventSetDescriptor;
	}

	@Override
	public MethodDescriptor[] getMethodDescriptors() {
		try {
			Class<?> localClass = SaveFilter.class;
			Class<?>[] arrayOfClass = new Class[1];
			arrayOfClass[0] = ImageEvent.class;
			String str = "imageChanged";
			Method localMethod = localClass.getMethod(str, arrayOfClass);
			ParameterDescriptor[] arrayOfParameterDescriptor =
					new ParameterDescriptor[1];
			arrayOfParameterDescriptor[0] = new ParameterDescriptor();
			MethodDescriptor localMethodDescriptor =
					new MethodDescriptor(localMethod,
							arrayOfParameterDescriptor);
			MethodDescriptor[] arrayOfMethodDescriptor =
					{ localMethodDescriptor };
			return arrayOfMethodDescriptor;
		} catch (Exception localException) {
			localException.printStackTrace();
		}
		return null;
	}

	@Override
	public PropertyDescriptor[] getPropertyDescriptors() {
		try {

			// set property names
			Class<?> localClass = SaveFilter.class;
			PropertyDescriptor localPropertyDescriptor1 =
					new PropertyDescriptor("path", localClass);
			PropertyDescriptor[] arrayOfPropertyDescriptor =
					{ localPropertyDescriptor1 };
			return arrayOfPropertyDescriptor;
		} catch (Exception localException) {
			localException.printStackTrace();
		}
		return null;
	}
}
